﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;

public partial class frmEmpleados : System.Web.UI.Page
{
    String id;
    protected void Page_Load(object sender, EventArgs e)
    {

        Label2.Text = DateTime.Now.ToString("dd/MM/yyyy");

        if (Session["empleado"] != null)
        {
            if (!Page.IsPostBack)
            {

                this.DSEmpleados.SelectParameters["numDocumento"].DefaultValue = this.Session["empleado"].ToString();
                this.DSEmpleados.DataSourceMode = SqlDataSourceMode.DataReader;
                SqlDataReader datos = (SqlDataReader)this.DSEmpleados.Select(DataSourceSelectArguments.Empty);

                while (datos.Read())
                {
                    this.TBNroDNI.Text = this.Session["empleado"].ToString();
                    this.TBNombre.Text = datos["nombre"].ToString();
                    this.TBApellido.Text = datos["apellido"].ToString();
                    this.TBEmail.Text = datos["dirCorreo"].ToString();
                    this.TBNroTelefono.Text = datos["numTelefono"].ToString();
                    this.DropTipoDNI.SelectedValue = datos["idTipoDocumento"].ToString();
                    this.DropCargo.SelectedValue = datos["idCargo"].ToString();
                    this.TBObservaciones.Text = datos["observaciones"].ToString();
                    this.DropDownList1.SelectedValue = datos["estado"].ToString();
                    this.Label8.Text = datos["fechaIngreso"].ToString();
                    this.Label11.Text = datos["legajo"].ToString();

                    this.TBCalle.Text = datos["calle"].ToString();
                    this.TBNumCasa.Text = datos["numeroCalle"].ToString();
                    this.TBPiso.Text = datos["piso"].ToString();
                    this.TBDpto.Text = datos["departamento"].ToString();
                    this.TBCodPostal.Text = datos["codPostal"].ToString();
                    this.DropBarrio.SelectedValue = datos["idBarrio"].ToString();
                    this.DropLocalidad.SelectedValue = datos["idLocalidad"].ToString();
                    this.DropProvincia.SelectedValue = datos["idProvincia"].ToString();


                    this.TBNroDNI.ReadOnly=true;
                    this.TBNombre.ReadOnly = true;
                    this.TBApellido.ReadOnly = true;
                    this.DropTipoDNI.Enabled = false;
                    this.TBNroTelefono.ReadOnly = true;
                    this.DropTipoTel.Enabled = false;
                    this.DropCargo.Enabled = false;
                    this.TBEmail.ReadOnly = true;
                    this.TBObservaciones.ReadOnly = true;

                    this.TBCalle.ReadOnly = true;
                    this.TBNumCasa.ReadOnly = true;
                    this.TBPiso.ReadOnly = true;
                    this.TBDpto.ReadOnly = true;
                    this.TBCodPostal.ReadOnly = true;
                    this.DropBarrio.Enabled = false;
                    this.DropLocalidad.Enabled = false;
                    this.DropProvincia.Enabled = false;
                    this.DropDownList1.Enabled = false;
                    Label11.Visible = true;

                    Button1.Enabled = false;
                    Button3.Enabled = true;


                }
            }
            Session["empleado"] = null;
        }
        else
        {
            this.DSEmpleados2.DataSourceMode = SqlDataSourceMode.DataReader;
            SqlDataReader datos = (SqlDataReader)this.DSEmpleados2.Select(DataSourceSelectArguments.Empty);

            while (datos.Read())
            {
                String dato = datos["legajo"].ToString();
                Label1.Text = (Convert.ToInt16(dato) + 1).ToString();
            }



            this.TBNroDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBNombre.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBApellido.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropTipoDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBNroTelefono.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropTipoTel.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropCargo.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBEmail.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBObservaciones.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TextBox2.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TextBox3.BackColor = System.Drawing.Color.FromName("#DDEDEE");

            this.TBCalle.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBNumCasa.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBPiso.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBDpto.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.TBCodPostal.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropBarrio.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropLocalidad.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropProvincia.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            this.DropDownList1.BackColor = System.Drawing.Color.FromName("#DDEDEE");

        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        this.DSEmpleados3.SelectParameters["numDocumento"].DefaultValue = this.TBNroDNI.Text;
        this.DSEmpleados3.DataSourceMode = SqlDataSourceMode.DataReader;
        SqlDataReader datos = (SqlDataReader)this.DSEmpleados3.Select(DataSourceSelectArguments.Empty);


        if (datos.Read() == true)
        {
            Label7.Text = datos["legajo"].ToString();
            id = Label7.Text;
            Label6.Text = "DNI ya Existe";
            TBNroDNI.Focus();


        }

        else
        {

            this.DSEmpleados.InsertParameters["calle"].DefaultValue = this.TBCalle.Text.ToUpper();
            this.DSEmpleados.InsertParameters["numeroCalle"].DefaultValue = this.TBNumCasa.Text.ToUpper();
            this.DSEmpleados.InsertParameters["piso"].DefaultValue = this.TBPiso.Text.ToUpper();
            this.DSEmpleados.InsertParameters["departamento"].DefaultValue = this.TBDpto.Text.ToUpper();
            this.DSEmpleados.InsertParameters["codPostal"].DefaultValue = this.TBCodPostal.Text.ToUpper();
            this.DSEmpleados.InsertParameters["idBarrio"].DefaultValue = this.DropBarrio.SelectedValue;
            this.DSEmpleados.InsertParameters["idLocalidad"].DefaultValue = this.DropLocalidad.SelectedValue;
            this.DSEmpleados.InsertParameters["idProvincia"].DefaultValue = this.DropProvincia.SelectedValue;
            this.DSEmpleados.InsertParameters["estado"].DefaultValue = this.DropDownList1.SelectedValue;



            this.DSEmpleados.InsertParameters["numDocumento"].DefaultValue = this.TBNroDNI.Text.ToUpper();
            this.DSEmpleados.InsertParameters["nombre"].DefaultValue = this.TBNombre.Text.ToUpper();
            this.DSEmpleados.InsertParameters["apellido"].DefaultValue = this.TBApellido.Text.ToUpper();
            this.DSEmpleados.InsertParameters["dirCorreo"].DefaultValue = this.TBEmail.Text;
            this.DSEmpleados.InsertParameters["numTelefono"].DefaultValue = this.TBNroTelefono.Text.ToUpper();
            this.DSEmpleados.InsertParameters["idTipoTelefono"].DefaultValue = this.DropTipoTel.SelectedValue;
            this.DSEmpleados.InsertParameters["idTipoDocumento"].DefaultValue = this.DropTipoDNI.SelectedValue;


            this.DSEmpleados.InsertParameters["fechaIngreso"].DefaultValue = DateTime.Now.ToString("dd/MM/yyyy");
            this.DSEmpleados.InsertParameters["idCargo"].DefaultValue = this.DropCargo.SelectedValue;
            this.DSEmpleados.InsertParameters["numDocumento"].DefaultValue = this.TBNroDNI.Text;

            this.DSEmpleados.Insert();

            Label3.Text = "Los Datos Se Registraron con Exito";
            this.TBNroDNI.ReadOnly = true;
            this.TBNombre.ReadOnly = true;
            this.TBApellido.ReadOnly = true;
            this.DropTipoDNI.Enabled = false;
            this.TBNroTelefono.ReadOnly = true;
            this.DropTipoTel.Enabled = false;
            this.DropCargo.Enabled = false;
            this.TBEmail.ReadOnly = true;
            this.TBObservaciones.ReadOnly = true;

            this.TBCalle.ReadOnly = true;
            this.TBNumCasa.ReadOnly = true;
            this.TBPiso.ReadOnly = true;
            this.TBDpto.ReadOnly = true;
            this.TBCodPostal.ReadOnly = true;
            this.DropBarrio.Enabled = false;
            this.DropLocalidad.Enabled = false;
            this.DropProvincia.Enabled = false;
            this.DropDownList1.Enabled = false;
            Label11.Text = Label1.Text;
            Label11.Visible = true;
            Label8.Text = DateTime.Now.ToString("dd/MM/yyyy");
            Label8.Visible = true;

            Button1.Enabled = false;
            Button3.Enabled = true;
          

        }

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        

        if (TBNroDNI.Text.Equals(""))
            Label3.Text = "Ingrese Numero de DNI";

        else
        {
            
                Label3.Text = "";
                this.DSEmpleados.SelectParameters["numDocumento"].DefaultValue = this.TBNroDNI.Text;
                this.DSEmpleados.DataSourceMode = SqlDataSourceMode.DataReader;
                SqlDataReader datos = (SqlDataReader)this.DSEmpleados.Select(DataSourceSelectArguments.Empty);

                if (datos.Read())
                {

                    this.TBNombre.Text = datos["nombre"].ToString();
                    this.TBApellido.Text = datos["apellido"].ToString();
                    this.TBEmail.Text = datos["dirCorreo"].ToString();
                    this.TBNroTelefono.Text = datos["numTelefono"].ToString();
                    this.DropTipoDNI.SelectedValue = datos["idTipoDocumento"].ToString();
                    this.TBObservaciones.Text = datos["observaciones"].ToString();
                    this.DropDownList1.SelectedValue = datos["estado"].ToString();
                    this.Label8.Text = datos["fechaIngreso"].ToString();
                    this.Label11.Text = datos["legajo"].ToString();

                    this.TBCalle.Text = datos["calle"].ToString();
                    this.TBNumCasa.Text = datos["numeroCalle"].ToString();
                    this.TBPiso.Text = datos["piso"].ToString();
                    this.TBDpto.Text = datos["departamento"].ToString();
                    this.TBCodPostal.Text = datos["codPostal"].ToString();
                    this.DropBarrio.SelectedValue = datos["idBarrio"].ToString();
                    this.DropLocalidad.SelectedValue = datos["idLocalidad"].ToString();
                    this.DropProvincia.SelectedValue = datos["idProvincia"].ToString();




                    this.DSEmpleados.DataSourceMode = SqlDataSourceMode.DataReader;
                    SqlDataReader datos3 = (SqlDataReader)this.DSEmpleados.Select(DataSourceSelectArguments.Empty);

                    if (datos3.Read())
                    {

                        this.DropCargo.SelectedValue = datos3["idCargo"].ToString();

                    }

                    

                    this.TBNroDNI.ReadOnly = true;
                    this.TBNombre.ReadOnly = true;
                    this.TBApellido.ReadOnly = true;
                    this.DropTipoDNI.Enabled = false;
                    this.TBNroTelefono.ReadOnly = true;
                    this.DropTipoTel.Enabled = false;
                    this.DropCargo.Enabled = false;
                    this.TBEmail.ReadOnly = true;
                    this.TBObservaciones.ReadOnly = true;

                    this.TBCalle.ReadOnly = true;
                    this.TBNumCasa.ReadOnly = true;
                    this.TBPiso.ReadOnly = true;
                    this.TBDpto.ReadOnly = true;
                    this.TBCodPostal.ReadOnly = true;
                    this.DropBarrio.Enabled = false;
                    this.DropLocalidad.Enabled = false;
                    this.DropProvincia.Enabled = false;
                    this.DropDownList1.Enabled = false;
                    this.Button3.Enabled = true;
                    this.Button1.Enabled = false;


                }
                

            else
            {
                Label3.Text = "No se encontraron registros";
                this.Button3.Enabled = false;
                this.Button1.Enabled = true;
                Label11.Visible = true;
                TBNroDNI.ReadOnly = true;
               
                this.TBNombre.Text = "";
                this.TBApellido.Text = "";
                this.DropTipoDNI.SelectedIndex = 0;
                this.TBNroTelefono.Text = "";
                this.DropTipoTel.SelectedIndex = 0;
                this.DropCargo.SelectedIndex = 0;
                this.TBEmail.Text = "";
                this.TBObservaciones.Text = "";
                this.Label11.Text = "";
                this.Label8.Text = "";

                this.TBCalle.Text = "";
                this.TBNumCasa.Text = "";
                this.TBPiso.Text = "";
                this.TBDpto.Text = "";
                this.TBCodPostal.Text = "";
                this.DropBarrio.SelectedIndex = 0;
                this.DropLocalidad.SelectedIndex = 0;
                this.DropProvincia.SelectedIndex = 0;
                this.DropDownList1.SelectedIndex = 0;

                this.TBNroDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                this.TBNombre.BackColor = System.Drawing.Color.White;
                this.TBApellido.BackColor = System.Drawing.Color.White;
                this.DropTipoDNI.BackColor = System.Drawing.Color.White;
                this.TBNroTelefono.BackColor = System.Drawing.Color.White;
                this.DropTipoTel.BackColor = System.Drawing.Color.White;
                this.DropCargo.BackColor = System.Drawing.Color.White;
                this.TBEmail.BackColor = System.Drawing.Color.White;
                this.TBObservaciones.BackColor = System.Drawing.Color.White;
                this.TextBox2.BackColor = System.Drawing.Color.White;
                this.TextBox3.BackColor = System.Drawing.Color.White;

                this.TBCalle.BackColor = System.Drawing.Color.White;
                this.TBNumCasa.BackColor = System.Drawing.Color.White;
                this.TBPiso.BackColor = System.Drawing.Color.White;
                this.TBDpto.BackColor = System.Drawing.Color.White;
                this.TBCodPostal.BackColor = System.Drawing.Color.White;
                this.DropBarrio.BackColor = System.Drawing.Color.White;
                this.DropLocalidad.BackColor = System.Drawing.Color.White;
                this.DropProvincia.BackColor = System.Drawing.Color.White;
                this.DropDownList1.BackColor = System.Drawing.Color.White;


            }
            
        }
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        Label3.Text = "";
        
        if (Button3.Text.Equals("Modificar Datos"))
        {

           // this.TBNroDNI.ReadOnly = false;
            this.TBNombre.ReadOnly = false;
            this.TBApellido.ReadOnly = false;
            //this.DropTipoDNI.Enabled = true;
            this.TBNroTelefono.ReadOnly = false;
            this.DropTipoTel.Enabled = true;
            this.DropCargo.Enabled = true;
            this.TBEmail.ReadOnly = false;
            this.TBObservaciones.ReadOnly = false;

            this.TBCalle.ReadOnly = false;
            this.TBNumCasa.ReadOnly = false;
            this.TBPiso.ReadOnly = false;
            this.TBDpto.ReadOnly = false;
            this.TBCodPostal.ReadOnly = false;
            this.DropBarrio.Enabled = true;
            this.DropLocalidad.Enabled = true;
            this.DropProvincia.Enabled = true;
            this.DropDownList1.Enabled = true;
            Button3.Text = "Guardar Cambios";
            Button3.Font.Bold = true;

            //this.TBNroDNI.BackColor = System.Drawing.Color.White;
            this.TBNombre.BackColor = System.Drawing.Color.White;
            this.TBApellido.BackColor = System.Drawing.Color.White;
            //this.DropTipoDNI.BackColor = System.Drawing.Color.White;
            this.TBNroTelefono.BackColor = System.Drawing.Color.White;
            this.DropTipoTel.BackColor = System.Drawing.Color.White;
            this.DropCargo.BackColor = System.Drawing.Color.White;
            this.TBEmail.BackColor = System.Drawing.Color.White;
            this.TBObservaciones.BackColor = System.Drawing.Color.White;
            this.TextBox2.BackColor = System.Drawing.Color.White;
            this.TextBox3.BackColor = System.Drawing.Color.White;

            this.TBCalle.BackColor = System.Drawing.Color.White;
            this.TBNumCasa.BackColor = System.Drawing.Color.White;
            this.TBPiso.BackColor = System.Drawing.Color.White;
            this.TBDpto.BackColor = System.Drawing.Color.White;
            this.TBCodPostal.BackColor = System.Drawing.Color.White;
            this.DropBarrio.BackColor = System.Drawing.Color.White;
            this.DropLocalidad.BackColor = System.Drawing.Color.White;
            this.DropProvincia.BackColor = System.Drawing.Color.White;
            this.DropDownList1.BackColor = System.Drawing.Color.White;

        }

        else
        {
            
           
                 this.DSEmpleados.UpdateParameters["numDocumento"].DefaultValue = this.TBNroDNI.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["nombre"].DefaultValue = this.TBNombre.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["apellido"].DefaultValue = this.TBApellido.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["idTipoDocumento"].DefaultValue = this.DropTipoDNI.SelectedValue;
                 this.DSEmpleados.UpdateParameters["dirCorreo"].DefaultValue = this.TBEmail.Text;
                 this.DSEmpleados.UpdateParameters["numTelefono"].DefaultValue = this.TBNroTelefono.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["idTipoTelefono"].DefaultValue = this.DropTipoTel.SelectedValue;
                 this.DSEmpleados.UpdateParameters["idCargo"].DefaultValue = this.DropCargo.SelectedValue;
                 this.DSEmpleados.UpdateParameters["observaciones"].DefaultValue = this.TBObservaciones.Text;
                 this.DSEmpleados.UpdateParameters["estado"].DefaultValue = this.DropDownList1.SelectedValue;


                 this.DSEmpleados.UpdateParameters["calle"].DefaultValue = this.TBCalle.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["numeroCalle"].DefaultValue = this.TBNumCasa.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["piso"].DefaultValue = this.TBPiso.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["departamento"].DefaultValue = this.TBDpto.Text.ToUpper();
                 this.DSEmpleados.UpdateParameters["codPostal"].DefaultValue = this.TBCodPostal.Text;
                 this.DSEmpleados.UpdateParameters["idBarrio"].DefaultValue = this.DropBarrio.SelectedValue;
                 this.DSEmpleados.UpdateParameters["idLocalidad"].DefaultValue = this.DropLocalidad.SelectedValue;
                 this.DSEmpleados.UpdateParameters["idProvincia"].DefaultValue = this.DropProvincia.SelectedValue;

                 this.DSEmpleados.Update();
          

                        
                 Button3.Text = "Modificar Datos";
                 Button3.Font.Bold = false;

            
                 this.TBNroDNI.ReadOnly = true;
                 this.TBNombre.ReadOnly = true;
                 this.TBApellido.ReadOnly = true;
                 this.DropTipoDNI.Enabled = false;
                 this.TBNroTelefono.ReadOnly = true;
                 this.DropTipoTel.Enabled = false;
                 this.DropCargo.Enabled = false;
                 this.TBEmail.ReadOnly = true;
                 this.TBObservaciones.ReadOnly = true;

                 this.TBCalle.ReadOnly = true;
                 this.TBNumCasa.ReadOnly = true;
                 this.TBPiso.ReadOnly = true;
                 this.TBDpto.ReadOnly = true;
                 this.TBCodPostal.ReadOnly = true;
                 this.DropBarrio.Enabled = false;
                 this.DropLocalidad.Enabled = false;
                 this.DropProvincia.Enabled = false;
                 this.DropDownList1.Enabled = false;

           
                 this.TBNroDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBNombre.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBApellido.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropTipoDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBNroTelefono.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropTipoTel.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropCargo.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBEmail.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBObservaciones.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TextBox2.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TextBox3.BackColor = System.Drawing.Color.FromName("#DDEDEE");

                 this.TBCalle.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBNumCasa.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBPiso.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBDpto.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.TBCodPostal.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropBarrio.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropLocalidad.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropProvincia.BackColor = System.Drawing.Color.FromName("#DDEDEE");
                 this.DropDownList1.BackColor = System.Drawing.Color.FromName("#DDEDEE");
            

        }
    }
    protected void Button4_Click(object sender, EventArgs e)
    {
        Response.Redirect("frmListaDeEmpleados.aspx");
    }
    protected void Button5_Click(object sender, EventArgs e)
    {
        Response.Redirect("MenuAdministracion.aspx");
    }
    protected void Button6_Click(object sender, EventArgs e)
    {
        Button1.Enabled = false;
        Button3.Enabled = false;
        
        Label3.Text = "";
        this.TBNroDNI.Text="";
        this.TBNombre.Text = "";
        this.TBApellido.Text = "";
        this.DropTipoDNI.SelectedIndex = 0;
        this.TBNroTelefono.Text = "";
        this.DropTipoTel.SelectedIndex = 0;
        this.DropCargo.SelectedIndex = 0;
        this.TBEmail.Text = "";
        this.TBObservaciones.Text = "";
        this.Label11.Text = "";
        this.Label8.Text = "";

        this.TBCalle.Text = "";
        this.TBNumCasa.Text = "";
        this.TBPiso.Text = "";
        this.TBDpto.Text = "";
        this.TBCodPostal.Text = "";
        this.DropBarrio.SelectedIndex = 0;
        this.DropLocalidad.SelectedIndex = 0;
        this.DropProvincia.SelectedIndex = 0;
        this.DropDownList1.SelectedIndex = 0;

        this.TBNroDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBNombre.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBApellido.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropTipoDNI.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBNroTelefono.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropTipoTel.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropCargo.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBEmail.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBObservaciones.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TextBox2.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TextBox3.BackColor = System.Drawing.Color.FromName("#DDEDEE");

        this.TBCalle.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBNumCasa.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBPiso.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBDpto.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.TBCodPostal.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropBarrio.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropLocalidad.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropProvincia.BackColor = System.Drawing.Color.FromName("#DDEDEE");
        this.DropDownList1.BackColor = System.Drawing.Color.FromName("#DDEDEE");

        this.TBNroDNI.ReadOnly = false;
        this.TBNombre.ReadOnly = false;
        this.TBApellido.ReadOnly = false;
        this.DropTipoDNI.Enabled = true;
        this.TBNroTelefono.ReadOnly = false;
        this.DropTipoTel.Enabled = true;
        this.DropCargo.Enabled = true;
        this.TBEmail.ReadOnly = false;
        this.TBObservaciones.ReadOnly = false;

        this.TBCalle.ReadOnly = false;
        this.TBNumCasa.ReadOnly = false;
        this.TBPiso.ReadOnly = false;
        this.TBDpto.ReadOnly = false;
        this.TBCodPostal.ReadOnly = false;
        this.DropBarrio.Enabled = true;
        this.DropLocalidad.Enabled = true;
        this.DropProvincia.Enabled = true;
        this.DropDownList1.Enabled = true;
    }
}